Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
MySQL
1) Aggregate Functions
2) Backup Load
3) Command Mysql
4) Cursor
5) Data Type
6) Database
7) Date Time
8) Engine
9) Event
10) Flow Control
11) Fulltext Search
12) Function
13) Geometric
14) Insert Delete Update
15) Internationalization
16) Join
17) Key
18) Math
19) Procedure Function
20) Regular Expression
21) Select Clause
22) String
23) Table Index
24) Transaction
25) Trigger
26) User Permission
27) View
28) Where Clause
29) XML
String
1) A backslash turns off the special meaning of the character
2) A pattern match against a binary column is case sensitive
3) Add the setting NO_ZERO_IN_DATE to the SQL_MODE system variable
4) Append string in select clause
5) ASCII(SUBSTRING(database,1,1))
6) Binary Character String Comparison
7) Canonizing Not-Quite-ISO Date Strings
8) Case-insensitive nature of string comparisons
9) CHAR_LENGTH Function
10) Combining a Date and a Time into a Date-and-Time Value
11) Compare String in where clause
12) Compare string value
13) CONCAT(string1, string2 [{, string} ])
14) CONCAT_WS() function allows you to define a separator as one of the arguments in the function
15) Concatenate string with NULL value
16) Concatenating Character Strings
17) Concatenating String Values
18) Concatenation can be useful for modifying column values in place
19) Controlling Case Sensitivity of String Sorts
20) Convert the output column to binary and sort that
21) Convert the values to uppercase or lowercase with UPPER( ) or LOWER( )
22) Create Initial name with substr function
23) Decomposing or Combining Strings
24) Define string value
25) Determine how many bytes are necessary for storing the data
26) Determining the Length of a Character String
27) Display an ASCII bar chart of the test score counts, convert the counts to strings of characters
28) Extracting Parts of Character Strings
29) For each player whose last name starts with the capital B
30) Force name values to be case sensitive using BINARY
31) Functions in SQL
32) Generate Unique Sequential Numbers
33) Get 3-letter substrings from the dept column
34) Get cases name and length in the production dept
35) Get from left of a string
36) Get names that sound like Gary Miller
37) Get string length
38) Get the binary representation of the values 6 and 10
39) Get the decimal values that belong to the binary representations 1001 and 111
40) Get the numeric middle part by beginning with the ID, then stripping off the rightmost suffix
41) Get the second and fourth segments from the id values
42) Identify the collation used for a string by using the COLLATION() function
43) If we left justify the pop values by padding them on the right with RPAD( )
44) In operator and pair value
45) In some cases, pattern matches are equivalent to substring comparisons
46) INSTR(string, substring) identifies where the substring is located in the string and returns the position
47) LEFT(string, length)
48) LENGTH Function
49) Length of trimmed varchar value
50) LENGTH(CONCAT(CAST(100000 AS CHAR(6)),000))
51) LENGTH(RTRIM(SPACE(8)))
52) Lists names from the names table with the longest names first
53) LOCATE(substring, string)
54) LOCATE(substring, string, position)
55) LOWER(string)
56) LTRIM(RTRIM( SQL ))
57) Manipulate retrieved data from the Employees table
58) Mix binary and nonbinary string columns within a single table
59) Non-ISO results from the CONCAT( ) operation can be converted into ISO format three different ways as follows
60) NULL values fail comparisons both with and with =
61) Pair value and not in operator
62) Pair value vs and operator
63) Prepend a sufficient number of periods to the hostname values to guarantee that they have the requisite number
64) Preserving Trailing Spaces in String Columns
65) REPEAT(string, count)
66) REPLACE(database,a,ee)
67) Replaces the underscores with spaces and concatenates the word
68) Retrieve 2 concatenated calculated fields
69) Return just the MM-DD component of the date with RIGHT()
70) REVERSE(string)
71) RIGHT(string, length)
72) SELECT LOCATE(A,abc)
73) SELECT LOCATE(A,BINARY abc)
74) SELECT RIGHT(1995-03-01,5), RIGHT(1996-02-29,5)
75) Simplest concatenate string
76) Simplest concatenate string 2
77) Sort using combinations of substrings
78) Sorting by Fixed-Length Substrings
79) Sorting by Variable-Length Substrings
80) STRCMP( ) takes two string arguments and returns -1, 0, or 1, depending on whether the first string is lexical
81) String comparisons are performed from left to right, one character at a time
82) String comparisons in MySQL are not case sensitive by default
83) String function
84) Strip off the last three characters (the LENGTH( ) function returns the length of a string)
85) Substract string index
86) SUBSTRING( ) function takes a string and a starting position, returning everything to the right of the positio
87) SUBSTRING(string, position)
88) SUBSTRING(string, position, length)
89) Substrings can be used to perform comparisons
90) The ASCII() function allows you to identify the numeric value of the first character in a string
91) The CONVERT() function allows you to convert dates in the same way as the CAST() function
92) The following comparison produces a result that is correct in lexical terms but incorrect in temporal terms
93) The length of the shortest verse in the King James Version, thats easy to find
94) The ORD() function works just like the ASCII() function except that it also supports multibyte characters
95) The STRCMP() compares string values that can be literal values or derived from expressions
96) The two strings 4200 and 4200 0 are not the same
97) To chart the relative frequency distribution instead, use the percentage values
98) To combine strings rather than pull them apart, use the CONCAT( ) function
99) To make a string comparison case sensitive, cast (convert) one of the strings to binary form by using the BINA
100) To make a string comparison not case sensitive, convert both strings to the same lettercase using UPPER( ) or
101) To make tstr case sensitive, use BINARY
102) To return everything to the right or left of a given character, use SUBSTRING_INDEX(str,c,n)
103) To specify a particular character as the escape character, use an ESCAPE clause
104) Trim a string
105) Trim strings
106) UPPER(string)
107) Use Concat to create Initial for the name
108) Use CONVERT to copy data from one column of a table into another and change the character set
109) Use string function in select clause
110) Use the CONCAT() and LEFT() functions to create registration codes for the employees
111) Use the CONCAT_WS() function to concatenate the employee names
112) Using BINARY has the effect of causing [
113) Using Binary with REGEXP
114) Using String Functions in Your SQL Statements
115) What CONVERT actually works can be seen by transforming the character string into hexadecimal representation